<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<style>
	.pagination li{display:inline;}
</style>
<body>
	<center>
	<form action="show">
		<input type="text" name="sou">
		<input type="submit" value="搜索">
	</form>
		<table>
			<tr>
				<td>name</td>
				<td>pwd</td>
				<td>rpwd</td>
				<td>操作</td>
			</tr>
			{volist name='list' id='user'}
			
			<tr>
				<td>{$user.name}</td>
				<td>{$user.pwd}</td>
				<td>{$user.rpwd}</td>
				<td id="{$user.id}" class="a"><a href="">删除</a></td>
			</tr>
			{/volist}
		</table>
		<div>{$list->render()}</div>
	</center>
</body>
</html>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
	$(document).on("click",".a",function(){ 
        var id=$(this).attr('id');
        $.ajax({
        	url:"{:url('index/good/del')}",
        	data:{id:id},
        	success: function (res) {
               if(res==1){
                 location.href=location.href;
               }
            }
        })
        
	 })
</script>

